<template>
  <a-spin :spinning="visible" wrapperClassName="loading">
    <div v-if="visible" class="loading"></div>
  </a-spin>
</template>

<script>
import { Spin } from 'ant-design-vue';
export default {
  name: 'Loading',
  components: {
    [Spin.name]: Spin
  },
  data() {
    return {
      visible: true,
    };
  },
};
</script>
<style lang="less" scoped>
.loading {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  //background: rgba(255, 255, 255, 0.1);
  z-index: 44;
}
.loading-box {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100px;
  transform: translate(-50%, -50%);
  line-height: 28px;
  i {
    font-size: 24px;
    margin-right: 5px;
  }
}
</style>
